// 禁用表单编辑和删除按钮
export const disabledFunction = "return !row.myself";
// 订单状态
export const orderStatus = {
  30: {
    name: "DRAFT",
    label: "草稿",
    type: "default"
  },
  31: {
    name: "UNDER_REVIEW",
    label: "审批中",
    type: "primary"
  },
  32: {
    name: "DONE",
    label: "已生效",
    type: "success"
  },
  33: {
    name: "UNDONE",
    label: "已撤销",
    type: "info"
  },
  34: {
    name: "REFUSE",
    label: "已拒绝",
    type: "danger"
  }
};
// 同意/拒绝审批类型
export const optType = {
  "AGREE": {
    name: "AGREE",
    label: "同意",
    value: 10
  },
  "REFUSE": {
    name: "REFUSE",
    label: "拒绝",
    value: 20
  },
  "SEND": {
    name: "SEND",
    label: "发起",
    value: 30
  },
  "UNDO": {
    name: "UNDO",
    label: "撤销",
    value: 40
  },
  "TO_DRAFT": {
    name: "TO_DRAFT",
    label: "转为草稿",
    value: 50
  },
  "ADMIN_TO_DRAFT": {
    name: "ADMIN_TO_DRAFT",
    label: "管理员重置为草稿",
    value: 60
  },
  "APPROVE_PENDING": {
    name: "APPROVE_PENDING",
    label: "待审批",
    value: 70
  }
};
// 是否需要对订单进行审批
export const shouldApproveEnum = {
  "YES": {
    name: "YES",
    value: 10,
  },
  "NO": {
    name: "NO",
    value: 20,
  }
};

export const materialType = {
  "cloth": {
    "value": 15,
    "text": "纺织品"
  },
  "device": {
    "value": 16,
    "text": "备件"
  },
  "raw-material": {
    "value": 17,
    "text": "原料"
  }
};

// 待审批/ 已审批
export const approveEnum = {
  UNDER_REVIEW: {
    name: "UNDER_REVIEW",
    label: "待审批",
    type: "primary",
  },
  REVIEWED: {
    name: "REVIEWED",
    label: "已审批",
    type: "primary",
  },
};
export const orderStatusEnum = {
  DRAFT: {
    name: "DRAFT",
    label: "草稿",
    type: "default",
    value: 30
  },
  UNDER_REVIEW: {
    name: "UNDER_REVIEW",
    label: "审批中",
    type: "primary",
    value: 31
  },
  DONE: {
    name: "DONE",
    label: "已生效",
    type: "success",
    value: 32
  },
  // UNDONE: {
  //     name: "UNDONE",
  //     label: "已撤销",
  //     type: "info",
  //     visible: false,
  //     value: 33
  // },
  REFUSE: {
    name: "REFUSE",
    label: "已拒绝",
    type: "danger",
    value: 34
  }
};

export const orderStatusExtra = {"showTextProp": "statusShowText", "typeFunction": "if(value == 30){ return 'warning'} else if(value == 31) {return ''} else if(value == 32) {return 'success'} else if (value == 33) {return 'info'} else if (value == 34) {return 'danger'}"};
